---
title: Code examples
---

Our GitHub repository has a wealth of examples to explore and try out. You can check out our [examples folder](https://github.com/run-llama/LlamaIndexTS/tree/main/examples) to see them all at once, or browse the pages in this section for some selected highlights.

## Use examples locally

It may be useful to check out all the examples at once so you can try them out locally. To do this into a folder called `my-new-project`, run these commands:

```bash npm2yarn
npx degit run-llama/LlamaIndexTS/examples my-new-project
cd my-new-project
npm i
```

Then you can run any example in the folder with `tsx`, e.g.:

```bash npm2yarn
export OPENAI_API_KEY=your-api-key
npx tsx ./agents/agent/openai.ts
```

## Try examples online

You can also try the examples online using StackBlitz:

<iframe
  className="w-full h-[440px]"
  aria-label="LlamaIndex.TS Examples"
  aria-description="This is a list of examples for LlamaIndex.TS."
  src="https://stackblitz.com/github/run-llama/LlamaIndexTS/tree/main/examples?file=README.md"
/>